home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 11 / Mac Magazin and MacEasy Magazine CD - Issue 11.iso / Sharewarebibliothek / Entwickler / WASTE 1.1 C / Read me < prev    next >
Text File  |  1995-05-26  |  10KB  |  142 lines

  1. C WASTE 1.1
  2. A port of version 1.1a9 of Marco Piovanelli's TextEdit Replacement WASTE to C
  3. By Dan Crevier (mailto:dan@rhino.harvard.edu)
  4. Release 15
  5. May 26, 1995
  6.  
  7. Introduction
  8.      WASTE is a replacement written by Marco Piovanelli which is World Script aware, and supports more than 32K of text.  It is available at <ftp://ghost.dsi.unimi.it/pub2/papers/piovanel/>.  It was written in Pascal and contains a library which can be used with a variety of compilers.  Before using this C port, you should download the original WASTE distribution and read the included documentation.
  9.      I converted WASTE from pascal to C so that a PPC native version could be compiled.  My goal was to make it as similar to the original pascal version as possible.  The C source is almost exactly the same as the pascal source.  This means that when upgrades are made to WASTE, it should be painless to make the same upgrades to the C version, and also, programs that now use the WASTE library.  The downside of this is that the C code could have been made slightly better if written differently.
  10.      This is a port of version 1.1a9 .  Version 1.1 adds many features over 1.0, but is still in alpha testing.  However, it seems very stable.  There is also a version of CWASTE based on WASTE 1.0.
  11.  
  12. Using C WASTE
  13.      It is simple to convert any project that now uses WASTE to use the C version.  It is simply a matter of using the new version of WASTE.h (see below for difference in WASTE.h), and adding all of the C files to the project.  If you are using any undocumented routines in WASTE, you might have to remove the word pascal from their prototypes.
  14.      The files must be compiled as C, not C++, so if you are using CodeWarrior, make sure you have not turned on the "Activate C++" option.  This option makes it so that .c, .cp, and .cpp files all get compiled as C++.  With the option off, .c gets compiled as C, and .cp and .cpp get compiled as C++.
  15.      The header file WASTEIntf.h should not be used in your source files.  It has all of the declarations for the internal workings of WASTE, which are subject to change in future versions.  You should continue to only include WASTE.h.
  16.  
  17. Differences from WASTE
  18.      I've tried to minimize the changes to WASTE.  There are a few modifications that can be turned on and off in WASTEIntf.h.  WASTE.h is now exactly the same as the version included with WASTE1.1a9.
  19.  
  20. The following features can be optionally included:
  21.  
  22. • Optimizations in _WERedraw by Mark Alldritt when WEREDRAW_SPEED is defined.  It significantly speed up inserting/deleting text by scrolling text on the screen instead of redrawing it.  It may have some bugs that cause redrawing programs though.
  23.  
  24. • If WEPINSCROLL is defined, Chris Thomas's modifications are used to make WEScroll behave like TEPinScroll.
  25.  
  26. • Optimizations in recalcs by Leonard Rosenthol when WESMARTRECALCSLOP is defined.  Only recalcs slops when text is not left justified.
  27.  
  28. • WEFORCE_2BYTE modification by Dan Crevier.  I found that with the new versions of the language kit updaters (1.1.1), GetScriptManagerVariable(smDoubleByte) is returning false for some reason.  If WEFORCE_2BYTE is defined, the two-byte flag is always set to true.
  29.  
  30. • WASTE_NO_RO_CARET modification by Dan Crevier.  When defined, the caret is never drawn if weFReadOnly is true.
  31.  
  32. Internet Config Support
  33.  
  34.      I've added support for cmd-clicking URL's using Internet Config by Quinn.  To use it, define WASTE_IC.  You also need the IC Programmer's Kit, which is available at:
  35. <ftp://redback.cs.uwa.edu.au//Others/Quinn/Config/ICProgKit1.1.sit>
  36. Users will need Internet Config to be able to cmd-click URL's.  It is available at:
  37. <ftp://redback.cs.uwa.edu.au//Others/Quinn/Config/InternetConfig1.1.sit>
  38.  
  39. Tab Support
  40.  
  41.      The tab handling code has been removed from CWASTE and is now in a separate archive called WETabs.
  42.  
  43. Changes in Release 2
  44.  
  45. • Fixed a bunch of bugs in the code for dealing with objects.
  46.  
  47. Changes in Release 3
  48.  
  49. • Incorporated fix by Martin Fricke in GWorld allocation
  50. • Incorporated fix by Martin Fricke in offscreen drawing
  51. • I added support for tabs in _WEFindLineBreak() so that word breaks are calculated correctly with tabs.
  52.  
  53. Changes in Release 4
  54.  
  55. • Fixed small bug in my tab support in _WEFindLineBreak().
  56.  
  57. Changes in Release 5
  58.  
  59. • Fixed another bug in my tab support in _WEFindLineBreak().
  60.  
  61. Changes in Release 6
  62.  
  63. • Included this documentation file
  64. • Included optimizations in recalcs by Leonard Rosenthol when WESMARTRECALCSLOP is defined.  Only recalcs slops when text is justified.
  65.  
  66. Changes in Release 7
  67.  
  68. • Updated to WASTE 1.1a5
  69. • Added support for WASTE_DEBUG flag as in pascal verision of WASTE.
  70.      Note:  There is some code commented out in _WESanityCheck (in WEDebug.c).  It seems to crash for some reason.  If anyone knows why, let me know.  Also, WEAssert doesn't prepend "Assertion Failed: " to the message, mostly due to lazyness on my part.
  71. • Added WEFORCE_2BYTE modification by Dan Crevier.  I found that with the new versions of the language kit updaters (1.1.1), GetScriptManagerVariable(smDoubleByte) is returning false for some reason.  If WEFORCE_2BYTE is defined, the two-byte flag is always set to true.
  72. • Added WASTE_NO_RO_CARET modification by Dan Crevier.  When defined, the caret is never drawn if weFReadOnly is true.
  73. • Added code to _WEContinousStyleRange to make sure _WESetStyle is never called with the object flag, so it is impossible to have WEContinousStyle write beyond the bounds of a TextStyle structure.
  74. • Fixed a bug in Leonard Rosenthal's WESMARTRECALCSLOP code that would cause it to not work with centered or right justified text
  75. • Added WEDRAG_BY_REGION modification by Dan Crevier.  Without WEDRAG_BY_REGION #defined, drags are only initiated when the cursor is over the text, but with it defined, drags are started whenever the cursor is anywhere in the highlighted region.  This makes a difference if you for example triple click to select a whole line and then try to drag something by clicking somewhere in the highlighted region that is to the right of the text.
  76. • The tab support has been majorly changed due to hooks added to WASTE.  All of the tab code is now in WETabs.c.  The routine WEInstallTabHooks() will install all of the hooks necessary to use tabs.  Unfortunately, I had to add a couple of parameters to the hook functions to be able to support tabs.  I had to add Fixed hPos to WEPixelToCharProcPtr and long hPos to WECharToPixelProcPtr.  (Yeah, it might have been better to make them the same type...)
  77. • I added some improvements to the tab code by Bert Seltzer, which makes the code work correctly with horizontal scrolling.  I haven't tested the code, and there were lots of changes to the tab stuff, so it may not work...
  78.  
  79. Changes in Release 8
  80.  
  81. • Fixed bug in _WEDrawObject introduced in release 7.
  82. • Fixed bug in WECharByte introduced in release 8.
  83.  
  84. Changes in Release 9
  85.  
  86. • Added extern "C" stuff around prototypes in WETabs.h
  87. • Fixed bug in SLPixelToChar found by Marco
  88. • Removed WEDRAG_BY_REGION modifications -- above bug fix removes the problem
  89. • Fixed a couple of other serious bugs pointed out by Marco, and one I found
  90.  
  91. Changes in Release 10
  92.  
  93. • Updated to WASTE1.1a6
  94. • Added WERemoveTSMHandlers routine to work around a problem I've been having when using inline input in a non-WASTE application when a WASTE application is in the background.  I added this for myself, so I didn't put anything about it in WASTE.h.
  95. • Fixed a bug in word wrap with tabs.  I don't think it will work with text that is horizontally scrolled...
  96. • Hooks for calling tab routines are now exactly the same as in the pascal WASTE (this was a change in WASTE 1.1a6, not my C port).
  97. • WASTE.h is now exactly the same as the version included with WASTE 1.1a6.
  98. • Removed WETabs from archive, to be put in separate archive.
  99. • Should compile with MPW without modifications (thanks to Roger Brown)
  100.  
  101. Changes in Release 11
  102.  
  103. • Fixed bug in _WEClickObject pointed out by Michael Kamprath.  It wasn't restoring the lock state of the object handle if the click was handled. (bug in port, not in WASTE)
  104. • Fixed bug in inline input code that was creating 0 length style runs -- pointed out by Martin Sladok. (bug in port, not in WASTE)
  105.  
  106. Changes in Release 12
  107.  
  108. • Brought up to WASTE 1.1a8.  Note: this version now uses UPP's for callback functions and requires changes to code that uses WASTE.  Failure to make changes will not give compiler errors, but will crash on the PPC.  This change is not specific to CWASTE, but is required for WASTE 1.1a7 or greater.  For example, to add a clickloop, you need to do something like:
  109.  
  110.      static WEClickLoopUPP        clickLoop = NULL;
  111.      if (clickLoop == NULL)
  112.           clickLoop = NewWEClickLoopProc(WEClickLoop);
  113.      WESetInfo(weClickLoop, (Ptr)&clickLoop, macWE);
  114.  
  115. Also requires new version of WETabs (1.2).
  116.  
  117. • Added support for Internet Config (see section above).
  118.  
  119. Changes in Release 13
  120. 5/20/95
  121. • Fixed problem with _WEDrawLines that was making it crash on machines without 32-bit quickdraw (Thanks Jud Spencer). 
  122. • Updated to WASTE 1.1a9
  123. • Added #pragma unused() (now supported in CW 6) for function arguments that aren't used.  It now compiles with no warning in CW 6.
  124. • Incorporated fix by Peter DiCamillo that fixes a bug that could crashes when dragging to the trash.  It will be in the next WASTE.
  125. • Fixed problem that would cause it to crash under System 7.0 (thanks Michael Kamprath).
  126. • Fixed bug with undoing inline input.
  127.  
  128. Changes in Release 14
  129. 5/26/95
  130. • Fixed bug in WENewAction (Thanks Michael Kamprath). 
  131.  
  132. Acknowledgements
  133.      Thanks for Marco Piovanelli for writing WASTE and letting me see a C conversion of WASTE that was based on an older version of WASTE and not quite working.
  134.      Also, thanks to John Kendall for giving me a version of Marco's C port that he had gotten to work.
  135.      Thanks to Martin Fricke for some bug fixes.
  136.      Thanks to Mark Alldritt and Leonard Rosenthol for enhancements.
  137.      Thanks to Michael Kamprath for bug fixes and the Object Archive.
  138.  
  139. If you have any questions, or find any bugs, I can be contacted at:
  140. mailto:dan@rhino.harvard.edu
  141.  
  142.